This is built upon Erika’s work. Using the TraMineR package for sequence analysis. The first part is analysis of persuader’s sequences.

#install.packages("TraMineR")
library(TraMineR)
## 
## TraMineR stable version 2.0-12 (Built: 2019-06-22)
## Website: http://traminer.unige.ch
## Please type 'citation("TraMineR")' for citation information.
library(magrittr)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union

Load the data. And plot the frequencies of different states at each step, comparing the donated and not donated groups.

persuader <- read.csv("persuaderOnly.csv", stringsAsFactors = F)
persuader.alphab <- c("emo", "log", "cre", "pro","task", "other")
persuader.seq <- seqdef(persuader, 3:12, alphabet = persuader.alphab)
##  [>] 6 distinct states appear in the data:
##      1 = cre
##      2 = emo
##      3 = log
##      4 = other
##      5 = pro
##      6 = task
##  [>] state coding:
##        [alphabet]  [label]  [long label]
##      1  emo         emo      emo
##      2  log         log      log
##      3  cre         cre      cre
##      4  pro         pro      pro
##      5  task        task     task
##      6  other       other    other
##  [>] 652 sequences in the data set
##  [>] min/max sequence length: 10/10
donate.seq <- seqdef(persuader %>% filter(persuader$donate_p==1), 3:12, alphabet = persuader.alphab)
##  [>] 6 distinct states appear in the data:
##      1 = cre
##      2 = emo
##      3 = log
##      4 = other
##      5 = pro
##      6 = task
##  [>] state coding:
##        [alphabet]  [label]  [long label]
##      1  emo         emo      emo
##      2  log         log      log
##      3  cre         cre      cre
##      4  pro         pro      pro
##      5  task        task     task
##      6  other       other    other
##  [>] 362 sequences in the data set
##  [>] min/max sequence length: 10/10
notdonate.seq <- seqdef(persuader %>% filter(persuader$donate_p==0), 3:12, alphabet = persuader.alphab)
##  [>] 6 distinct states appear in the data:
##      1 = cre
##      2 = emo
##      3 = log
##      4 = other
##      5 = pro
##      6 = task
##  [>] state coding:
##        [alphabet]  [label]  [long label]
##      1  emo         emo      emo
##      2  log         log      log
##      3  cre         cre      cre
##      4  pro         pro      pro
##      5  task        task     task
##      6  other       other    other
##  [>] 290 sequences in the data set
##  [>] min/max sequence length: 10/10
#seqdplot(persuader.seq, group = persuader$donate_p, border = NA)

Now, we need to analyse the subsequences of these groups.

#transition <- seqetm(persuader.seq, method = "transition")
#transition
pder.seqe <- seqecreate(persuader.seq)
pder.seqestate <- seqecreate(persuader.seq, tevent = "state")
pder.seqeperiod <- seqecreate(persuader.seq, tevent = "period")
#pder.seqe[1]
#pder.seqestate[1]
#pder.seqeperiod[1]

don.seqe <- seqecreate(donate.seq)
don.seqestate <- seqecreate(donate.seq, tevent = "state")
don.seqeperiod <- seqecreate(donate.seq, tevent = "period")

ndon.seqe <- seqecreate(notdonate.seq)
ndon.seqestate <- seqecreate(notdonate.seq, tevent = "state")
ndon.seqeperiod <- seqecreate(notdonate.seq, tevent = "period")

There is also another function to compare subsequence frenquencies from two groups. However, there are two methods to calculate, and I don’t know what they are exactly. But the Chi-square test is less strict than the other one Bonferroni test.

pdersubseq <- seqefsub(pder.seqestate, min.support = 10, constraint = seqeconstraint(count.method = 1, max.gap = 1))
cohort <- factor(persuader$donate_p > 0, labels = c("no donation", "donation"))
discrcohort011 <- seqecmpgroup(pdersubseq, group = cohort, method = "chisq", pvalue.limit = 0.1)
discrcohort011
##                    Subsequence    Support     p.value statistic index
## 1                        (log) 0.68404908 0.004229809  8.182429     4
## 2               (task)-(other) 0.15337423 0.016350211  5.764815    17
## 3         (log)-(task)-(other) 0.02760736 0.030203472  4.697674    55
## 4      (emo)-(cre)-(emo)-(log) 0.01687117 0.037892656  4.309834    83
## 5    (other)-(emo)-(cre)-(emo) 0.01687117 0.037892656  4.309834    88
## 6                (log)-(other) 0.22239264 0.058234484  3.586966    10
## 7           (cre)-(pro)-(task) 0.01533742 0.058702928  3.573656    92
## 8  (log)-(other)-(log)-(other) 0.01533742 0.058702928  3.573656    95
## 9                  (pro)-(emo) 0.05828221 0.059678586  3.546294    37
## 10         (other)-(emo)-(cre) 0.03374233 0.061439763  3.498087    48
## 11         (log)-(other)-(log) 0.02914110 0.064150364  3.426695    52
## 12        (cre)-(task)-(other) 0.02147239 0.075162806  3.166512    65
## 13                      (task) 0.48466258 0.081365723  3.037408     5
## 14           (log)-(emo)-(log) 0.02760736 0.092856437  2.824143    54
##    Freq.no donation Freq.donation Resid.no donation Resid.donation
## 1       0.624137931    0.73204420         -1.233568       1.104098
## 2       0.113793103    0.18508287         -1.721119       1.540479
## 3       0.010344828    0.04143646         -1.769258       1.583565
## 4       0.003448276    0.02762431         -1.759837       1.575133
## 5       0.003448276    0.02762431         -1.759837       1.575133
## 6       0.186206897    0.25138122         -1.306701       1.169556
## 7       0.003448276    0.02486188         -1.634833       1.463249
## 8       0.003448276    0.02486188         -1.634833       1.463249
## 9       0.079310345    0.04143646          1.483310      -1.327628
## 10      0.017241379    0.04696133         -1.529750       1.369195
## 11      0.013793103    0.04143646         -1.531080       1.370385
## 12      0.034482759    0.01104972          1.511988      -1.353297
## 13      0.444827586    0.51657459         -0.974415       0.872145
## 14      0.041379310    0.01657459          1.411503      -1.263359
## 
## Computed on 652 event sequences
##    Constraint Value
##       max.gap     1
##  count.method  COBJ
plot(discrcohort011, resid.levels = c(0.1,0.05), rows = 1, cols = 1)

plot(discrcohort011, resid.levels = c(0.1,0.05), rows = 1, cols = 1, ptype = "resid")

pdersubseq <- seqefsub(pder.seqestate, min.support = 10, constraint = seqeconstraint(count.method = 1, max.gap = 3))
cohort <- factor(persuader$donate_p > 0, labels = c("no donation", "donation"))
discrcohort01_1 <- seqecmpgroup(pdersubseq, group = cohort, method = "chisq", pvalue.limit = 0.05)
discrcohort01_1
##                                 Subsequence    Support      p.value
## 1                      (log)-(task)-(other) 0.10122699 0.0001038347
## 2                (cre)-(log)-(task)-(other) 0.05828221 0.0015632503
## 3               (cre)-(other)-(other)-(log) 0.02760736 0.0017516704
## 4       (other)-(cre)-(other)-(emo)-(other) 0.04754601 0.0021446018
## 5                (emo)-(log)-(task)-(other) 0.05214724 0.0022392035
## 6                 (cre)-(cre)-(log)-(other) 0.02607362 0.0027209950
## 7          (emo)-(cre)-(log)-(task)-(other) 0.01993865 0.0029022130
## 8               (cre)-(other)-(emo)-(other) 0.06901840 0.0030934441
## 9               (other)-(cre)-(other)-(emo) 0.08128834 0.0036720464
## 10                      (cre)-(other)-(log) 0.10582822 0.0041465257
## 11                      (cre)-(log)-(other) 0.19631902 0.0041905578
## 12                                    (log) 0.68404908 0.0042298091
## 13             (log)-(other)-(task)-(other) 0.03374233 0.0060839659
## 14         (cre)-(emo)-(log)-(task)-(other) 0.02300613 0.0065562034
## 15       (cre)-(log)-(other)-(task)-(other) 0.02300613 0.0065562034
## 16 (other)-(cre)-(emo)-(log)-(task)-(other) 0.01687117 0.0071896180
## 17               (pro)-(log)-(task)-(other) 0.01687117 0.0071896180
## 18                 (emo)-(cre)-(log)-(task) 0.03220859 0.0091336005
## 19       (other)-(emo)-(log)-(task)-(other) 0.03220859 0.0091336005
## 20            (other)-(log)-(other)-(other) 0.04601227 0.0100468778
## 21      (other)-(cre)-(other)-(other)-(log) 0.02147239 0.0101706042
## 22                            (log)-(other) 0.40797546 0.0112228743
## 23              (pro)-(other)-(log)-(other) 0.03527607 0.0143703965
## 24       (other)-(cre)-(log)-(task)-(other) 0.03987730 0.0145862101
## 25                      (cre)-(pro)-(other) 0.06595092 0.0154626991
## 26                    (pro)-(other)-(other) 0.04754601 0.0198709336
## 27            (other)-(cre)-(other)-(other) 0.08128834 0.0198972859
## 28                    (other)-(log)-(other) 0.17484663 0.0200766379
## 29                    (cre)-(other)-(other) 0.12423313 0.0228243302
## 30        (other)-(cre)-(cre)-(log)-(other) 0.01840491 0.0244506914
## 31                           (task)-(other) 0.26533742 0.0262910207
## 32              (other)-(cre)-(pro)-(other) 0.04601227 0.0279447849
## 33                (cre)-(pro)-(log)-(other) 0.02300613 0.0283126764
## 34                      (cre)-(other)-(emo) 0.13803681 0.0294454543
## 35                             (log)-(task) 0.17484663 0.0342230873
## 36                (cre)-(pro)-(other)-(log) 0.01687117 0.0378926557
## 37  (other)-(emo)-(cre)-(emo)-(cre)-(other) 0.01687117 0.0378926557
## 38                      (pro)-(cre)-(other) 0.05674847 0.0424443644
## 39          (cre)-(emo)-(log)-(other)-(emo) 0.02300613 0.0441848949
## 40               (log)-(emo)-(task)-(other) 0.02607362 0.0445875669
## 41              (cre)-(other)-(log)-(other) 0.06441718 0.0472332676
##    statistic index Freq.no donation Freq.donation Resid.no donation
## 1  15.065668    84      0.048275862    0.14364641         -2.834171
## 2  10.002533   178      0.024137931    0.08563536         -2.408513
## 3   9.793109   411      0.003448276    0.04696133         -2.476094
## 4   9.421464   233      0.017241379    0.07182320         -2.366742
## 5   9.342332   202      0.020689655    0.07734807         -2.345896
## 6   8.985707   423      0.003448276    0.04419890         -2.386127
## 7   8.867947   597      0.000000000    0.03591160         -2.404622
## 8   8.751518   138      0.034482759    0.09668508         -2.238639
## 9   8.439265   110      0.044827586    0.11049724         -2.177763
## 10  8.218509    80      0.065517241    0.13812155         -2.110190
## 11  8.199342    33      0.144827586    0.23756906         -1.979032
## 12  8.182429     4      0.624137931    0.73204420         -1.233568
## 13  7.525263   338      0.010344828    0.05248619         -2.169107
## 14  7.390698   498      0.003448276    0.03867403         -2.195829
## 15  7.390698   500      0.003448276    0.03867403         -2.195829
## 16  7.224975   735      0.000000000    0.03038674         -2.211931
## 17  7.224975   775      0.000000000    0.03038674         -2.211931
## 18  6.796515   347      0.010344828    0.04972376         -2.074617
## 19  6.796515   355      0.010344828    0.04972376         -2.074617
## 20  6.626566   250      0.020689655    0.06629834         -2.010346
## 21  6.604768   555      0.003448276    0.03591160         -2.094656
## 22  6.429681    10      0.351724138    0.45303867         -1.499736
## 23  5.992062   327      0.013793103    0.05248619         -1.947840
## 24  5.965772   291      0.017241379    0.05801105         -1.930342
## 25  5.862968   152      0.037931034    0.08839779         -1.858039
## 26  5.423198   239      0.024137931    0.06629834         -1.828133
## 27  5.420884   111      0.051724138    0.10497238         -1.765839
## 28  5.405218    39      0.134482759    0.20718232         -1.643854
## 29  5.181826    69      0.089655172    0.15193370         -1.670627
## 30  5.062376   665      0.003448276    0.03038674         -1.877440
## 31  4.936777    22      0.220689655    0.30110497         -1.476045
## 32  4.831471   248      0.024137931    0.06353591         -1.736589
## 33  4.808927   501      0.006896552    0.03591160         -1.808679
## 34  4.741379    54      0.103448276    0.16574586         -1.585381
## 35  4.483524    38      0.137931034    0.20441989         -1.503420
## 36  4.309834   714      0.003448276    0.02762431         -1.759837
## 37  4.309834   746      0.003448276    0.02762431         -1.759837
## 38  4.117396   182      0.034482759    0.07458564         -1.591690
## 39  4.049482   496      0.037931034    0.01104972          1.675670
## 40  4.034171   439      0.010344828    0.03867403         -1.658799
## 41  3.937060   155      0.041379310    0.08287293         -1.545754
##    Resid.donation
## 1        2.536710
## 2        2.155726
## 3        2.216214
## 4        2.118340
## 5        2.099681
## 6        2.135690
## 7        2.152244
## 8        2.003682
## 9        1.949195
## 10       1.888715
## 11       1.771322
## 12       1.104098
## 13       1.941448
## 14       1.965365
## 15       1.965365
## 16       1.979777
## 17       1.979777
## 18       1.856875
## 19       1.856875
## 20       1.799349
## 21       1.874811
## 22       1.342330
## 23       1.743404
## 24       1.727742
## 25       1.663028
## 26       1.636261
## 27       1.580505
## 28       1.471322
## 29       1.495286
## 30       1.680392
## 31       1.321126
## 32       1.554325
## 33       1.618848
## 34       1.418987
## 35       1.345628
## 36       1.575133
## 37       1.575133
## 38       1.424633
## 39      -1.499800
## 40       1.484699
## 41       1.383519
## 
## Computed on 652 event sequences
##    Constraint Value
##       max.gap     3
##  count.method  COBJ
plot(discrcohort01_1, resid.levels = c(0.05,0.01), rows = 1, cols = 1)

plot(discrcohort01_1, resid.levels = c(0.05,0.01), rows = 1, cols = 1, ptype = "resid")

pdersubseq <- seqefsub(pder.seqe, min.support = 10, constraint = seqeconstraint(count.method = 1, max.gap = 1))
cohort <- factor(persuader$donate_p > 0, labels = c("no donation", "donation"))
discrcohort111 <- seqecmpgroup(pdersubseq, group = cohort, method = "chisq", pvalue.limit = 0.1)
discrcohort111
##                        Subsequence    Support     p.value statistic index
## 1          (log>task)-(task>other) 0.03374233 0.006083966  7.525263    67
## 2    (emo>cre)-(cre>emo)-(emo>log) 0.01993865 0.015772071  5.828109    96
## 3                      (other>log) 0.21625767 0.031811135  4.608646     9
## 4             (cre>pro)-(pro>task) 0.01533742 0.058702928  3.573656   127
## 5                     (task>other) 0.18558282 0.058882285  3.568590    13
## 6              (log>emo)-(emo>log) 0.03220859 0.063357417  3.447242    70
## 7          (other>task)-(task>cre) 0.01993865 0.064258029  3.423926   104
## 8            (cre>log)-(log>other) 0.04907975 0.084236765  2.981201    46
## 9                        (pro>emo) 0.05981595 0.086792462  2.932881    42
## 10 (other>cre)-(cre>emo)-(emo>cre) 0.02760736 0.091714847  2.844014    78
## 11                     (log>other) 0.28680982 0.091827695  2.842038     6
##    Freq.no donation Freq.donation Resid.no donation Resid.donation
## 1       0.010344828    0.05248619         -2.169107      1.9414477
## 2       0.003448276    0.03314917         -1.988757      1.7800260
## 3       0.175862069    0.24861878         -1.479269      1.3240123
## 4       0.003448276    0.02486188         -1.634833      1.4632490
## 5       0.151724138    0.21270718         -1.338444      1.1979671
## 6       0.048275862    0.01933702          1.524598     -1.3645833
## 7       0.006896552    0.03038674         -1.572891      1.4078076
## 8       0.031034483    0.06353591         -1.387111      1.2415264
## 9       0.079310345    0.04419890          1.357376     -1.2149123
## 10      0.013793103    0.03867403         -1.415840      1.2672399
## 11      0.251724138    0.31491713         -1.115660      0.9985656
## 
## Computed on 652 event sequences
##    Constraint Value
##       max.gap     1
##  count.method  COBJ
plot(discrcohort111, resid.levels = c(0.1,0.05), rows = 1, cols = 1)

plot(discrcohort111, resid.levels = c(0.1,0.05), rows = 1, cols = 1, ptype = "resid")

pdersubseq <- seqefsub(pder.seqe, min.support = 10, constraint = seqeconstraint(count.method = 1, max.gap = 3))
cohort <- factor(persuader$donate_p > 0, labels = c("no donation", "donation"))
discrcohort11_1 <- seqecmpgroup(pdersubseq, group = cohort, method = "chisq", pvalue.limit = 0.05)
discrcohort11_1
##                                    Subsequence    Support    p.value
## 1                            (other)-(emo>cre) 0.04447853 0.01444164
## 2  (other)-(other>cre)-(cre>other)-(other>emo) 0.01993865 0.01577207
## 3                (emo>cre)-(cre>emo)-(emo>log) 0.03834356 0.02109198
## 4                      (log>task)-(task>other) 0.04141104 0.02932134
## 5          (other>cre)-(cre>other)-(other>emo) 0.02760736 0.03020347
## 6          (other>emo)-(emo>other)-(emo>other) 0.02760736 0.03065596
## 7                                  (other>log) 0.21625767 0.03181114
## 8          (other>cre)-(cre>other)-(emo>other) 0.01687117 0.03789266
## 9                      (cre>other)-(other>emo) 0.06134969 0.03881494
## 10               (other)-(other>emo)-(emo>cre) 0.06134969 0.03881494
##    statistic index Freq.no donation Freq.donation Resid.no donation
## 1   5.983339    85      0.020689655    0.06353591         -1.920869
## 2   5.828109   230      0.003448276    0.03314917         -1.988757
## 3   5.319177   100      0.017241379    0.05524862         -1.835186
## 4   4.748647    94      0.020689655    0.05801105         -1.734043
## 5   4.697674   154      0.010344828    0.04143646         -1.769258
## 6   4.672126   157      0.044827586    0.01381215          1.764921
## 7   4.608646    12      0.175862069    0.24861878         -1.479269
## 8   4.309834   306      0.003448276    0.02762431         -1.759837
## 9   4.268949    58      0.037931034    0.08011050         -1.610107
## 10  4.268949    60      0.037931034    0.08011050         -1.610107
##    Resid.donation
## 1        1.719263
## 2        1.780026
## 3        1.642573
## 4        1.552046
## 5        1.583565
## 6       -1.579683
## 7        1.324012
## 8        1.575133
## 9        1.441118
## 10       1.441118
## 
## Computed on 652 event sequences
##    Constraint Value
##       max.gap     3
##  count.method  COBJ
plot(discrcohort11_1, resid.levels = c(0.05,0.01), rows = 1, cols = 1)

plot(discrcohort11_1, resid.levels = c(0.05,0.01), rows = 1, cols = 1, ptype = "resid")

persuader <- read.csv("persuaderPersuadee.csv", stringsAsFactors = F)
persuader.alphab  <- c("opening","askp","providep","positive","offtask","asktask","agree","disagree","cre","emo","log","other","pro","task") # the order of strategies
#persuader.alphab <- c("A1","A11","A12","A16","A17","A18","A19", "A3", "A5","A6","cre","emo","log","other","pro","task") # the order of strategies
persuader.seq <- seqdef(persuader, 3:22, alphabet = persuader.alphab)
##  [>] 14 distinct states appear in the data:
##      1 = agree
##      2 = askp
##      3 = asktask
##      4 = cre
##      5 = disagree
##      6 = emo
##      7 = log
##      8 = offtask
##      9 = opening
##      10 = other
##      11 = positive
##      12 = pro
##       ...
## Warning:  [!] No automatic color palette assigned because number of states > 12.
##                
##      Use 'cpal' argument to assign one.
##  [>] state coding:
##        [alphabet]  [label]  [long label]
##      1  opening     opening  opening
##      2  askp        askp     askp
##      3  providep    providep providep
##      4  positive    positive positive
##      5  offtask     offtask  offtask
##      6  asktask     asktask  asktask
##      7  agree       agree    agree
##      8  disagree    disagree disagree
##      9  cre         cre      cre
##      10  emo         emo      emo
##      11  log         log      log
##      12  other       other    other
##       ... (14 states)
##  [>] no color palette attributed, provide one to use graphical functions
##  [>] 633 sequences in the data set
##  [>] min/max sequence length: 20/20
donate.seq <- seqdef(persuader %>% filter(persuader$donate_p==1), 3:22, alphabet = persuader.alphab)
##  [>] 14 distinct states appear in the data:
##      1 = agree
##      2 = askp
##      3 = asktask
##      4 = cre
##      5 = disagree
##      6 = emo
##      7 = log
##      8 = offtask
##      9 = opening
##      10 = other
##      11 = positive
##      12 = pro
##       ...
## Warning:  [!] No automatic color palette assigned because number of states > 12.
##                
##      Use 'cpal' argument to assign one.
##  [>] state coding:
##        [alphabet]  [label]  [long label]
##      1  opening     opening  opening
##      2  askp        askp     askp
##      3  providep    providep providep
##      4  positive    positive positive
##      5  offtask     offtask  offtask
##      6  asktask     asktask  asktask
##      7  agree       agree    agree
##      8  disagree    disagree disagree
##      9  cre         cre      cre
##      10  emo         emo      emo
##      11  log         log      log
##      12  other       other    other
##       ... (14 states)
##  [>] no color palette attributed, provide one to use graphical functions
##  [>] 355 sequences in the data set
##  [>] min/max sequence length: 20/20
notdonate.seq <- seqdef(persuader %>% filter(persuader$donate_p==0), 3:22, alphabet = persuader.alphab)
##  [>] 14 distinct states appear in the data:
##      1 = agree
##      2 = askp
##      3 = asktask
##      4 = cre
##      5 = disagree
##      6 = emo
##      7 = log
##      8 = offtask
##      9 = opening
##      10 = other
##      11 = positive
##      12 = pro
##       ...
## Warning:  [!] No automatic color palette assigned because number of states > 12.
##                
##      Use 'cpal' argument to assign one.
##  [>] state coding:
##        [alphabet]  [label]  [long label]
##      1  opening     opening  opening
##      2  askp        askp     askp
##      3  providep    providep providep
##      4  positive    positive positive
##      5  offtask     offtask  offtask
##      6  asktask     asktask  asktask
##      7  agree       agree    agree
##      8  disagree    disagree disagree
##      9  cre         cre      cre
##      10  emo         emo      emo
##      11  log         log      log
##      12  other       other    other
##       ... (14 states)
##  [>] no color palette attributed, provide one to use graphical functions
##  [>] 278 sequences in the data set
##  [>] min/max sequence length: 20/20
#seqdplot(persuader.seq, group = persuader$donate_p, border = NA)
#transition <- seqetm(persuader.seq, method = "transition")
#transition
pder.seqe <- seqecreate(persuader.seq)
pder.seqestate <- seqecreate(persuader.seq, tevent = "state")
pder.seqeperiod <- seqecreate(persuader.seq, tevent = "period")
#pder.seqe[1]
#pder.seqestate[1]
#pder.seqeperiod[1]

don.seqe <- seqecreate(donate.seq)
don.seqestate <- seqecreate(donate.seq, tevent = "state")
don.seqeperiod <- seqecreate(donate.seq, tevent = "period")

ndon.seqe <- seqecreate(notdonate.seq)
ndon.seqestate <- seqecreate(notdonate.seq, tevent = "state")
ndon.seqeperiod <- seqecreate(notdonate.seq, tevent = "period")
pdersubseq <- seqefsub(pder.seqestate, min.support = 10, constraint = seqeconstraint(count.method = 1, max.gap = 1))
cohort <- factor(persuader$donate_p > 0, labels = c("no donation", "donation"))
discrcohort011 <- seqecmpgroup(pdersubseq, group = cohort, method = "chisq", pvalue.limit = 0.05)
discrcohort011
##                                     Subsequence    Support      p.value
## 1                              (disagree)-(log) 0.02211690 0.0005424183
## 2                                       (agree) 0.61295419 0.0018844968
## 3          (other)-(offtask)-(other)-(providep) 0.08056872 0.0029536263
## 4              (emo)-(offtask)-(cre)-(providep) 0.02053712 0.0068264313
## 5  (other)-(offtask)-(other)-(providep)-(other) 0.04265403 0.0084769515
## 6                               (log)-(asktask) 0.18799368 0.0088961488
## 7                                         (log) 0.68562401 0.0091766937
## 8                         (log)-(asktask)-(log) 0.03791469 0.0113134393
## 9                              (log)-(disagree) 0.02685624 0.0126378079
## 10                                   (disagree) 0.14691943 0.0159224466
## 11                        (agree)-(log)-(agree) 0.03633491 0.0165184978
## 12             (providep)-(emo)-(offtask)-(emo) 0.07740916 0.0167769684
## 13           (agree)-(other)-(providep)-(other) 0.04107425 0.0169211694
## 14                        (cre)-(agree)-(other) 0.02053712 0.0174581539
## 15                           (other)-(positive) 0.17851501 0.0199605538
## 16                      (agree)-(log)-(asktask) 0.02527646 0.0209025457
## 17                   (agree)-(other)-(providep) 0.11374408 0.0214095592
## 18                                   (positive) 0.33807267 0.0224382848
## 19                      (offtask)-(log)-(agree) 0.03475513 0.0240024339
## 20       (emo)-(providep)-(emo)-(offtask)-(emo) 0.03791469 0.0375483077
## 21                                    (asktask) 0.76777251 0.0379770102
## 22             (cre)-(asktask)-(emo)-(providep) 0.04107425 0.0403119619
## 23             (log)-(asktask)-(emo)-(providep) 0.01737757 0.0412021030
## 24                                (agree)-(log) 0.17219589 0.0468448358
## 25           (other)-(agree)-(other)-(providep) 0.02685624 0.0494414029
##    statistic index Freq.no donation Freq.donation Resid.no donation
## 1  11.963879   525      0.046762590   0.002816901          2.763129
## 2   9.658771    11      0.543165468   0.667605634         -1.486256
## 3   8.835896   142      0.118705036   0.050704225          2.240154
## 4   7.318080   571      0.039568345   0.005633803          2.214212
## 5   6.929835   282      0.068345324   0.022535211          2.074094
## 6   6.843558    53      0.140287770   0.225352113         -1.834522
## 7   6.788111     7      0.629496403   0.729577465         -1.130202
## 8   6.415407   313      0.014388489   0.056338028         -2.014515
## 9   6.219118   436      0.046762590   0.011267606          2.025310
## 10  5.811418    75      0.187050360   0.115492958          1.745669
## 11  5.746824   320      0.014388489   0.053521127         -1.919659
## 12  5.719556   148      0.107913669   0.053521127          1.828059
## 13  5.704532   286      0.017985612   0.059154930         -1.899485
## 14  5.649721   564      0.003597122   0.033802817         -1.970907
## 15  5.415341    57      0.136690647   0.211267606         -1.650495
## 16  5.334899   453      0.007194245   0.039436620         -1.896339
## 17  5.293142    98      0.079136691   0.140845070         -1.710909
## 18  5.211475    31      0.287769784   0.377464789         -1.442482
## 19  5.094457   340      0.014388489   0.050704225         -1.821514
## 20  4.325367   312      0.057553957   0.022535211          1.681682
## 21  4.306052     5      0.726618705   0.800000000         -0.783098
## 22  4.204706   288      0.061151079   0.025352113          1.651706
## 23  4.167683   694      0.003597122   0.028169014         -1.742975
## 24  3.950953    61      0.136690647   0.200000000         -1.426604
## 25  3.860303   444      0.010791367   0.039436620         -1.634471
##    Resid.donation
## 1      -2.4451718
## 2       1.3152304
## 3      -1.9823764
## 4      -1.9594196
## 5      -1.8354248
## 6       1.6234211
## 7       1.0001477
## 8       1.7827017
## 9      -1.7922544
## 10     -1.5447927
## 11      1.6987611
## 12     -1.6177017
## 13      1.6809087
## 14      1.7441116
## 15      1.4605706
## 16      1.6781244
## 17      1.5140319
## 18      1.2764931
## 19      1.6119094
## 20     -1.4881684
## 21      0.6929858
## 22     -1.4616417
## 23      1.5424084
## 24      1.2624429
## 25      1.4463897
## 
## Computed on 633 event sequences
##    Constraint Value
##       max.gap     1
##  count.method  COBJ
plot(discrcohort011, resid.levels = c(0.05,0.01), rows = 1, cols = 1)

plot(discrcohort011, resid.levels = c(0.05,0.01), rows = 1, cols = 1, ptype = "resid")

pdersubseq <- seqefsub(pder.seqe, min.support = 10, constraint = seqeconstraint(count.method = 1, max.gap = 1))
cohort <- factor(persuader$donate_p > 0, labels = c("no donation", "donation"))
discrcohort111 <- seqecmpgroup(pdersubseq, group = cohort, method = "chisq", pvalue.limit = 0.05)
discrcohort111
##                                                          Subsequence
## 1                                                     (disagree>log)
## 2                   (other>offtask)-(offtask>other)-(other>providep)
## 3                         (emo>offtask)-(offtask>cre)-(cre>providep)
## 4  (other>offtask)-(offtask>other)-(other>providep)-(providep>other)
## 5                                                      (log>asktask)
## 6                                        (log>asktask)-(asktask>log)
## 7                                                     (log>disagree)
## 8                                            (agree>log)-(log>agree)
## 9                         (providep>emo)-(emo>offtask)-(offtask>emo)
## 10                   (agree>other)-(other>providep)-(providep>other)
## 11                                         (cre>agree)-(agree>other)
## 12                                                  (other>positive)
## 13                                         (agree>log)-(log>asktask)
## 14                                    (agree>other)-(other>providep)
## 15                                         (offtask>log)-(log>agree)
## 16         (emo>providep)-(providep>emo)-(emo>offtask)-(offtask>emo)
## 17                        (cre>asktask)-(asktask>emo)-(emo>providep)
## 18                        (log>asktask)-(asktask>emo)-(emo>providep)
## 19                                                       (agree>log)
## 20                      (other>agree)-(agree>other)-(other>providep)
##       Support      p.value statistic index Freq.no donation Freq.donation
## 1  0.02211690 0.0005424183 11.963879   544      0.046762590   0.002816901
## 2  0.08056872 0.0029536263  8.835896   135      0.118705036   0.050704225
## 3  0.02053712 0.0068264313  7.318080   593      0.039568345   0.005633803
## 4  0.04265403 0.0084769515  6.929835   286      0.068345324   0.022535211
## 5  0.18799368 0.0088961488  6.843558    45      0.140287770   0.225352113
## 6  0.03791469 0.0113134393  6.415407   320      0.014388489   0.056338028
## 7  0.02685624 0.0126378079  6.219118   450      0.046762590   0.011267606
## 8  0.03633491 0.0165184978  5.746824   327      0.014388489   0.053521127
## 9  0.07740916 0.0167769684  5.719556   143      0.107913669   0.053521127
## 10 0.04107425 0.0169211694  5.704532   290      0.017985612   0.059154930
## 11 0.02053712 0.0174581539  5.649721   586      0.003597122   0.033802817
## 12 0.17851501 0.0199605538  5.415341    49      0.136690647   0.211267606
## 13 0.02527646 0.0209025457  5.334899   468      0.007194245   0.039436620
## 14 0.11374408 0.0214095592  5.293142    89      0.079136691   0.140845070
## 15 0.03475513 0.0240024339  5.094457   348      0.014388489   0.050704225
## 16 0.03791469 0.0375483077  4.325367   318      0.057553957   0.022535211
## 17 0.04107425 0.0403119619  4.204706   292      0.061151079   0.025352113
## 18 0.01737757 0.0412021030  4.167683   728      0.003597122   0.028169014
## 19 0.17219589 0.0468448358  3.950953    53      0.136690647   0.200000000
## 20 0.02685624 0.0494414029  3.860303   459      0.010791367   0.039436620
##    Resid.no donation Resid.donation
## 1           2.763129      -2.445172
## 2           2.240154      -1.982376
## 3           2.214212      -1.959420
## 4           2.074094      -1.835425
## 5          -1.834522       1.623421
## 6          -2.014515       1.782702
## 7           2.025310      -1.792254
## 8          -1.919659       1.698761
## 9           1.828059      -1.617702
## 10         -1.899485       1.680909
## 11         -1.970907       1.744112
## 12         -1.650495       1.460571
## 13         -1.896339       1.678124
## 14         -1.710909       1.514032
## 15         -1.821514       1.611909
## 16          1.681682      -1.488168
## 17          1.651706      -1.461642
## 18         -1.742975       1.542408
## 19         -1.426604       1.262443
## 20         -1.634471       1.446390
## 
## Computed on 633 event sequences
##    Constraint Value
##       max.gap     1
##  count.method  COBJ
plot(discrcohort111, resid.levels = c(0.05,0.01), rows = 1, cols = 1)

plot(discrcohort111, resid.levels = c(0.05,0.01), rows = 1, cols = 1, ptype = "resid")